classdef Jobfile
  %JOBFILE Summary of this class goes here
  %   Detailed explanation goes here
  
  properties
  end
  
  methods(Static)
    function write()
      fid = fopen('jobfile', 'wt');
      fprintf(fid, 'cd ../ion1/ \n');
      fprintf(fid, 'cp ../POTCAR . \n');
      fprintf(fid, 'cp ~/vasp . \n');
      fprintf(fid, './vasp > output \n');
      fprintf(fid, 'rm -f ./vasp \n\n');
      
      fprintf(fid, 'cp WAVECAR ../lattice1/ \n');
      fprintf(fid, 'cp CONTCAR ../lattice1/POSCAR \n');
      fprintf(fid, 'cp POTCAR ../lattice1/ \n');
      fprintf(fid, 'cd ../lattice1/ \n');
      fprintf(fid, 'cp ~/vasp . \n');
      fprintf(fid, './vasp > output \n');
      fprintf(fid, 'rm -f ./vasp \n\n');
      
      fprintf(fid, 'cp WAVECAR ../ion2/ \n');
      fprintf(fid, 'cp CONTCAR ../ion2/POSCAR \n');
      fprintf(fid, 'cp POTCAR ../ion2/ \n');
      fprintf(fid, 'cd ../ion2/ \n');
      fprintf(fid, 'cp ~/vasp . \n');
      fprintf(fid, './vasp > output \n');
      fprintf(fid, 'rm -f ./vasp \n\n');
      
      fprintf(fid, 'cp WAVECAR ../lattice2/ \n');
      fprintf(fid, 'cp CONTCAR ../lattice2/POSCAR \n');
      fprintf(fid, 'cp POTCAR ../lattice2/ \n');
      fprintf(fid, 'cd ../lattice2/ \n');
      fprintf(fid, 'cp ~/vasp . \n');
      fprintf(fid, './vasp > output \n');
      fprintf(fid, 'rm -f ./vasp \n\n');
      
      fprintf(fid, 'cp WAVECAR ../sc/ \n');
      fprintf(fid, 'cp CONTCAR ../sc/POSCAR \n');
      fprintf(fid, 'cp POTCAR ../sc/ \n');
      fprintf(fid, 'cd ../sc/ \n');
      fprintf(fid, 'cp ~/vasp . \n');
      fprintf(fid, './vasp > output \n');
      fprintf(fid, 'rm -f ./vasp \n\n');
      
      fprintf(fid, 'cp CHGCAR ../bandstructure/ \n');
      fprintf(fid, 'cp CONTCAR ../bandstructure/ \n');
      fprintf(fid, 'cp POTCAR ../bandstructure/ \n\n');
      
      fprintf(fid, 'cp CHGCAR ../DOS/ \n');
      fprintf(fid, 'cp CONTCAR ../DOS/ \n');
      fprintf(fid, 'cp POTCAR ../DOS/ \n\n');
      
      fprintf(fid, 'cd ../bandstructure/ \n');
      fprintf(fid, 'cp ~/vasp . \n');
      fprintf(fid, './vasp > output \n');
      fprintf(fid, 'rm -f ./vasp \n\n');
      
      fprintf(fid, 'cd ../DOS/ \n');
      fprintf(fid, 'cp ~/vasp . \n');
      fprintf(fid, './vasp > output \n');
      fprintf(fid, 'rm -f ./vasp \n\n');
      
      fclose(fid);

      
    end
  end
  
end

